import React, { Suspense } from "react";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { Route_List } from "./routes";
import BeforeEach from "./beforeEach";
const Router: React.FC = () => {
  return (
    <BrowserRouter>
      <Routes>
        {Route_List.map((v, i) => {
          return (
            <Route
              path={v.path}
              element={<BeforeEach route={v}></BeforeEach>}
              key={i}
            ></Route>
          );
        })}
      </Routes>
    </BrowserRouter>
  );
};

export default Router;
